﻿package com.msjt.util;

import java.util.Calendar;

public class MyDate {
	public String getDateString(){
		Calendar c = Calendar.getInstance();//可以对每个时间域单独修改
		int year = c.get(Calendar.YEAR); 
		int month = c.get(Calendar.MONTH)+1; 
		int date = c.get(Calendar.DATE); 
		int hour = c.get(Calendar.HOUR_OF_DAY); 
		int minute = c.get(Calendar.MINUTE); 
		int miao=c.get(Calendar.SECOND);
		return year + "-" + month + "-" + date + " " +hour + ":" +minute +":"+miao;
	}
}
